package com.wander.patterns.act.mediator;

/**
 * @description: 研发部门
 * @author: zhuyong
 * @create: 2019-09-09 17:10
 **/
public class Development implements  Department{
    //上级的对象引用
    private Mediator mediator;

    public Development(Mediator mediator) {
        this.mediator = mediator;
        mediator.register("Development",this);
    }

    @Override
    public void selfAction() {
        System.out.println("研发部接通第三服务,需要申请资金");
        mediator.command("Finance");

    }

    @Override
    public void outAction() {
        System.out.println("向PM汇报工作");
    }
}
